﻿<%@ page language="C#" autoeventwireup="true" inherits="_edu_admin_SystemAdmin, App_Web_systemadmin.aspx.947cbfd6" %>
<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type" />

    <script language="javascript" src="../../window/jquery/jquery.min.js" type="text/javascript"></script>
    <script language="javascript" src="../../window/jquery-ui/jquery-ui.min.js" type="text/javascript"></script>
    <script language="javascript" src="../../window/message/jquery.message.js" type="text/javascript"></script>
    <script language="javascript" src="../../window/checked/jquery.checked.js" type="text/javascript"></script>
    <script language="javascript" src="../../window/maxInput/jquery.maxInput.js" type="text/javascript"></script>
    <script language="javascript" src="../../window/My97DatePicker/WdatePicker.js" type="text/javascript"></script>
    <script language="javascript" src="../../window/TableRowFocus/jquery.RowFocus.js" type="text/javascript"></script>
    <link href="../../window/_css/jquery-ui.custom.css" rel="stylesheet" type="text/css" />
    <link href="../../window/_css/window.css" rel="stylesheet" type="text/css" />
    <link href="../../css/listpage.css" rel="stylesheet" type="text/css" />
    <title>设置系统管理用户</title>

    <script language="javascript" type="text/javascript">
    var finder = null;
    $(function(){
        $("#insertPanel").dialog({
                autoOpen:false,
                width:600,
                height:300
        });
        $("#editPanel").dialog({
                autoOpen:false,
                      width:600,
                height:250
        });
        
        $("#btnAdd").click(function(){
           $("#insertPanel").dialog({ title: '录入' });
           $("#insertPanel").dialog("open");
           $("#insertPanel :text").val("");
           $("#hfEditID").val("");
        });
        if(isEdit){
 
          $("#editPanel").dialog("open");
        }
        $("#chk_all").checkedAll("ViewData",0);
        $("#chk_Rev").checkedRev("ViewData",0);
        
        $("#txtur_note").maxInput(255,"#noteCount");
        $("#editNoteCount").maxInput(255,"#txteditnote");
        
         
    });
    
    var isEdit = false;
    function ShowEdit(){
        isEdit = true;
    }
    </script>

    <style type="text/css">
<!--
.center {
	text-align: center;
}
-->
</style>
</head>
<body>
    <form id="form2" runat="server">
          <div class="ui-widget-header " style="padding: .4em 1em; margin:2px">
            <span class="ui-dialog-title" >教师用户列表</span>
         
        </div>
        
        <div class="panel">
            <input id="btnAdd" class="addnew" type="button" value="添加" />
            <asp:Button ID="btnDelete" runat="server" CssClass="delete" OnClick="lbDelete_Click"
                OnClientClick="return confirm('确认删除？');" Text="删除" />
            <asp:Button ID="lbUpdate" runat="server" CssClass="modify" OnClick="lbUpdate_Click"
                Text="修改" />&nbsp;
            <asp:Button ID="btnrush" runat="server" CssClass="btn" Text="刷新" OnClick="btnrush_Click"  />
            <input id="chk_all" name="chk_all" type="checkbox" />全选 <a id="chk_Rev" href="javascript:void(0)">
                反 选</a>
        </div>
        <asp:GridView ID="ViewData" runat="server" AutoGenerateColumns="False" BackColor="White"
            CssClass="gv" OnRowDataBound="ViewData_RowDataBound" Width="100%">
            <RowStyle CssClass="gvRow" />
            <HeaderStyle CssClass="gvHeader" />
            <AlternatingRowStyle CssClass="gvAlternatingRow" />
            <EmptyDataRowStyle  CssClass="gvEmpty"/>
            <Columns>
                <asp:TemplateField HeaderText="选择">
                    <ItemTemplate>
                        <input id="cbselect" runat="server" type="checkbox" value='<%#Eval("username") %>' />
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="序号">
                    <ItemTemplate>
                        <asp:Label ID="labIndex" runat="server"></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>

   
                <asp:BoundField DataField="username" HeaderText="用户名" />
                <asp:TemplateField HeaderText="登录">
                    <ItemTemplate>
                        <asp:LinkButton ID="lbChange" runat="server" OnClick="SetLogin_Click"  CommandArgument='<%#Eval("username") %>'>
                        <%# Convert.ToBoolean(Eval("islogin")) ? "<font color='green'>允许登录</font>" : "<font color='red'>禁止登录</font>"%>
                        </asp:LinkButton>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:BoundField DataField="cdate" HeaderText="创建日期" />
                <asp:BoundField DataField="note" HeaderText="备注" />
            </Columns>
            <EmptyDataTemplate>
                没有任何数据！
            </EmptyDataTemplate>
        </asp:GridView>
        <webdiyer:AspNetPager ID="PagerButtom" runat="server" AlwaysShow="True" BorderColor="Aqua"
            CssClass="paginator" CustomInfoHTML="当前第%CurrentPageIndex%/%PageCount%页 共%RecordCount%条记录 每页%PageSize%条 "
            CustomInfoSectionWidth="" FirstPageText="首页" HorizontalAlign="Right" LastPageText="尾页"
            LayoutType="Table" MoreButtonsClass="" NextPageText="下一页" NumericButtonCount="5"
            OnPageChanged="Pager_PageChanged" PageIndexBoxClass="cpb" PageSize="30" PrevPageText="上一页"
            ShowCustomInfoSection="Right" ShowPageIndexBox="Always">
        </webdiyer:AspNetPager>
        <div id="insertPanel" style="display: none" runat="server">
            <table border="0">
         <tr>
                    <td style="width: 118px">
                        <label for="txtur_username">
                            用户名*：</label></td>
                    <td style="width: 326px">
                        <asp:TextBox ID="txtur_username" runat="server" MaxLength="16" Width="139px"></asp:TextBox>数字或英文字母5-16之间！
                    </td>
                    <td style="width: 224px">
                        <asp:RequiredFieldValidator ID="rfvur_username" runat="server" ControlToValidate="txtur_username"
                            ErrorMessage="必填" ValidationGroup="insert"></asp:RequiredFieldValidator>
                        <asp:RegularExpressionValidator ID="RegularExpressionValidator3" runat="server" ControlToValidate="txtur_username"
                            ErrorMessage="数字或英文字母 长度在5和16之间！ " ValidationExpression="[a-zA-Z0-9_\x7f-\xff]{5,16}"
                            ValidationGroup="insert"></asp:RegularExpressionValidator></td>
                </tr>
                <tr>
                    <td style="width: 118px">
                        <label for="txtur_password">
                            密码*：</label></td>
                    <td style="width: 326px">
                        <asp:TextBox ID="txtur_password" runat="server" MaxLength="50" TextMode="Password"></asp:TextBox>数字或英文字母5-16之间！
                    </td>
                    <td style="width: 224px">
                        <asp:RequiredFieldValidator ID="rfvur_password" runat="server" ControlToValidate="txtur_password"
                            ErrorMessage="必填" ValidationGroup="insert"></asp:RequiredFieldValidator>
                        <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ControlToValidate="txtur_password"
                            ErrorMessage="数字或英文字母长度在5和16之间！ " ValidationExpression="[a-zA-Z0-9_\x7f-\xff]{5,16}"
                            ValidationGroup="insert"></asp:RegularExpressionValidator></td>
                </tr>
                <tr>
                    <td style="width: 118px">
                        密码验证*：</td>
                    <td style="width: 326px">
                        <asp:TextBox ID="txtTowPassword" runat="server" MaxLength="50" TextMode="Password"></asp:TextBox></td>
                    <td style="width: 224px">
                        <asp:CompareValidator ID="CompareValidator3" runat="server" ControlToCompare="txtur_password"
                            ControlToValidate="txtTowPassword" ErrorMessage="两次输入不一致" ValidationGroup="insert"></asp:CompareValidator></td>
                </tr>
                <tr>
                    <td style="width: 118px; height: 64px">
                        <label for="txtur_note">
                            备注：</label></td>
                    <td style="width: 326px">
                        <asp:TextBox ID="txtur_note" runat="server" MaxLength="50" Height="55px" Width="231px" TextMode="MultiLine"></asp:TextBox>
                        <span id="noteCount">0</span>/255
                    </td>
                    <td style="width: 224px">
                    </td>
                </tr>
                <tr>
                    <td>
                    </td>
                    <td style="width: 326px">
                        <asp:Button ID="btnSubmit" runat="server" Text="提交" ValidationGroup="insert" Width="102px" OnClick="btnSubmit_Click" /></td>
                    <td style="width: 224px">
                    </td>
                </tr>
            </table>
            <div id="editPanel" style="display:none;" title="编辑教委用户">
                    <table border="0">
                        <tr>
                            <td colspan="3" style="height: 18px">
                                *如果要修改密码请填写新的密码，不填写将保持原有密码</td>
                        </tr>
                        <tr>
                            <td style="width: 118px">
                                <label for="txtur_password">
                                    密码：</label></td>
                            <td style="width: 318px">
                                <asp:TextBox ID="txteditpassword" runat="server" MaxLength="50" TextMode="Password"></asp:TextBox></td>
                            <td style="width: 234px">
                                &nbsp;<asp:RegularExpressionValidator ID="RegularExpressionValidator4" runat="server" ControlToValidate="txteditpassword"
                                    ErrorMessage="数字或英文字母 长度在5和16之间！ " ValidationExpression="[a-zA-Z0-9_\x7f-\xff]{5,16}"
                                    ValidationGroup="edit"></asp:RegularExpressionValidator></td>
                        </tr>
                        <tr>
                            <td style="width: 118px">
                                密码验证：</td>
                            <td style="width: 318px">
                                <asp:TextBox ID="txteditTowPassword" runat="server" MaxLength="50" TextMode="Password"></asp:TextBox></td>
                            <td style="width: 234px">
                                <asp:CompareValidator ID="CompareValidator1" runat="server" ControlToCompare="txteditpassword"
                                    ControlToValidate="txteditTowPassword" ErrorMessage="两次输入不一致" ValidationGroup="edit"></asp:CompareValidator></td>
                        </tr>
                        <tr>
                            <td style="width: 118px; height: 64px">
                                <label for="txtur_note">
                                    备注：</label></td>
                            <td style="width: 318px">
                                <asp:TextBox ID="txteditnote" runat="server" Height="55px" MaxLength="50" Width="231px" TextMode="MultiLine"></asp:TextBox><span
                                    id="editNoteCount">0</span>/255</td> 
                            <td style="width: 234px">
                                <asp:HiddenField ID="hfEditID" runat="server" />
                            </td>
                        </tr>
                        <tr>
                            <td>
                            </td>
                            <td style="width: 318px">
                                <asp:Button ID="Button1" runat="server" Text="提交" ValidationGroup="edit" Width="102px" OnClick="btnSubmit_Click" /></td>
                            <td style="width: 234px">
                            </td>
                        </tr>
                    </table>
            </div>
        </div>
    </form>
</body>
</html>
<!--powered by 25175-->
